import { createApp } from "vue";
import App from "./App.vue";
// 缓存
import "./registerServiceWorker";
import router from "./router";
import store from "./store";

// 重置样式库
import "normalize.css";

// 自己项目的重置样式和公用样式
import "@/assets/styles/common.less";

const app = createApp(App);

// 全局混入 全局mixin
// vue2.0 写法  Vue.mixin({})
// vue3写法
app.mixin({
  methods: {
    say() {
      // $el 组件的根元素
      console.log(this.$el, "在mounted中调用say函数");
    },
  },
  mounted() {
    this.say();
  },
});

app.use(store).use(router).mount("#app");
